home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 24
/
PC Gamer IT CD 24 1-2.iso
/
DKMAGDEM
/
KEEPER
/
WinSetup
/
SETUP.RUL
< prev
next >
Wrap
Text File
|
1997-05-28
|
5KB
|
144 lines
// Dungeon Keeper Install Shield 3 Language Selector
// RReed Feb 22,'97
// Note: Localization taken from the registery.
// A language is determined or selected here & the relevant script is started in
// the selected language's corresponding directory. The main reason for this
// partitioning is so we can use Install Shield's localized resources per language
// w/o burning separate versions of the distribution CD. A non-english customer
// will only see the initial setup and possibly the selection (only if his 95 system
// is localized to a non supported language) in english. Everything from then on
// is displayed in the appropriate language.
declare
// Code page id's for supported languages
// The last 2 characters appear to stay the same regardless of language variations
#define LKEY_ENGLISH "09"
#define LKEY_FRENCH "0C"
// #define LKEY_GERMAN "07"
#define LKEY_SWEDISH "1D"
// #define LKEY_ITALIAN "10"
#define LKEY_SPANISH "0A"
#define LKEY_POLISH "15"
#define LKEY_DUTCH "13"
// Internal id's for supported languages
#define LANG_ENGLISH 0
#define LANG_FRENCH 1
// #define LANG_GERMAN 2
#define LANG_SWEDISH 3
// #define LANG_ITALIAN 4
#define LANG_SPANISH 5
#define LANG_POLISH 6
#define LANG_DUTCH 7
// FUNCTIONS
prototype GetLocale();
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
program
StartHere:
Disable( BACKGROUND );
Disable( BACKBUTTON );
Enable( DIALOGCACHE );
Enable( HOURGLASS );
switch (GetLocale())
case LANG_ENGLISH:
DoInstall( SRCDIR ^ "english\\setup.ins" , "" , NOWAIT );
case LANG_FRENCH:
DoInstall( SRCDIR ^ "french\\setup.ins" , "" , NOWAIT );
// case LANG_GERMAN:
// DoInstall( SRCDIR ^ "german\\setup.ins" , "" , NOWAIT );
case LANG_SWEDISH:
DoInstall( SRCDIR ^ "swedish\\setup.ins" , "" , NOWAIT );
// case LANG_ITALIAN:
// DoInstall( SRCDIR ^ "italian\\setup.ins" , "" , NOWAIT );
case LANG_SPANISH:
DoInstall( SRCDIR ^ "spanish\\setup.ins" , "" , NOWAIT );
case LANG_POLISH:
DoInstall( SRCDIR ^ "polish\\setup.ins" , "" , NOWAIT );
case LANG_DUTCH:
DoInstall( SRCDIR ^ "dutch\\setup.ins" , "" , NOWAIT );
endswitch;
exit;
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
function GetLocale()
NUMBER type, lang, length, retVal;
BOOL isEnglish, isFrench, isGerman, isSwedish, isItalian, isSpanish, isPolish, isDutch;
STRING regEntry;
begin
lang = -1;
RegDBSetDefaultRoot(HKEY_CURRENT_USER);
if (RegDBGetKeyValueEx("\\Control Panel\\International", "Locale", type, regEntry, length) = 0) then
// read the language set from the registry
StrSub(regEntry, regEntry, length - 3, 4);
if (StrCompare(regEntry, LKEY_ENGLISH) = 0) then
lang = LANG_ENGLISH;
elseif (StrCompare(regEntry, LKEY_FRENCH) = 0) then
lang = LANG_FRENCH;
// elseif (StrCompare(regEntry, LKEY_GERMAN) = 0) then
// lang = LANG_GERMAN;
elseif (StrCompare(regEntry, LKEY_SWEDISH) = 0) then
lang = LANG_SWEDISH;
// elseif (StrCompare(regEntry, LKEY_ITALIAN) = 0) then
// lang = LANG_ITALIAN;
elseif (StrCompare(regEntry, LKEY_SPANISH) = 0) then
lang = LANG_SPANISH;
elseif (StrCompare(regEntry, LKEY_POLISH) = 0) then
lang = LANG_POLISH;
elseif (StrCompare(regEntry, LKEY_DUTCH) = 0) then
lang = LANG_DUTCH;
endif;
endif;
if (lang = -1) then
// not set to a supported language, so ask (in english)
isEnglish = TRUE;
AskOptions( EXCLUSIVE, "Choose the language of the installation:",
"English", isEnglish,
"French", isFrench,
// "German" , isGerman,
"Swedish" , isSwedish,
// "Italian" , isItalian,
"Spanish" , isSpanish,
"Polish", isPolish,
"Dutch", isDutch);
if (isEnglish) then
lang = LANG_ENGLISH;
elseif (isFrench) then
lang = LANG_FRENCH;
// elseif (isGerman) then
// lang = LANG_GERMAN;
elseif (isSwedish) then
lang = LANG_SWEDISH;
// elseif (isItalian) then
// lang = LANG_ITALIAN;
elseif (isSpanish) then
lang = LANG_SPANISH;
elseif (isPolish) then
lang = LANG_POLISH;
elseif (isDutch) then
lang = LANG_DUTCH;
endif;
endif;
return lang;
end;
//--------------------------------------------------------------------------------------------------